package org.activequant.util.ib.marketscanners;
public enum Instrument {
 STK("STK", "US Stocks", "", "PRICE,VOLUME,AVGOPTVOLUME,MKTCAP,STKTYPE,DIVYIELDIB,GROWTHRATE,PERATIO,QUICKRATIO,DIVYIELD,RETEQUITY,PRICE2BK"),
 FUT_US("FUT.US", "US Futures", "FUT", "PRICE,VOLUME,PRODCAT,LEADFUT"),
 IND_US("IND.US", "US Indexes", "IND", "PRICE,VOLUME,AVGOPTVOLUME"),
 BOND("BOND", "US Corporate Bonds", "", "PRICE,VOLUME,AVGOPTVOLUME,MOODY,MATDATE,CPNRATE,CONVOPT,BONDCREDITRATING"),
 EFP("EFP", "US EFPs", "", "NOMEFPAMT"),
 STOCK_NA("STOCK.NA", "America Non-US Stocks", "STK", "VOLUME,DIVYIELDIB"),
 FUT_NA("FUT.NA", "America Non-US Futures", "FUT", "VOLUME,PRODCAT,LEADFUT"),
 STOCK_EU("STOCK.EU", "Europe Stocks", "STK", "VOLUME,DIVYIELDIB"),
 FUT_EU("FUT.EU", "Europe Futures", "FUT", "VOLUME,PRODCAT,LEADFUT"),
 IND_EU("IND.EU", "Europe Indexes", "IND", "VOLUME"),
 STOCK_HK("STOCK.HK", "Asia Stocks", "STK", "VOLUME,DIVYIELDIB"),
 FUT_HK("FUT.HK", "Asia Futures", "FUT", "VOLUME,PRODCAT,LEADFUT"),
 IND_HK("IND.HK", "Asia Indexes", "IND", "VOLUME"),
 Global("Global", "Global Futures", "FUT", "");
 
 private String type;
 private String name;
 private String secType;
 private String filters;
 
 public String getType() {
	return type;
}

public String getName() {
	return name;
}

public String getSecType() {
	return secType;
}

public String getFilters() {
	return filters;
}

public String toString() {
		return type;
 }
 
 Instrument(String type, String name, String secType, String filters) {
		this.type = type;
		this.name = name;
		this.secType = secType;
		this.filters = filters;
 }
 
 public static Instrument toClass(String value) {
	for(Instrument symbol: values()) {
		if(symbol.toString().equals(value)) {
			return symbol;
		}
	}
	throw new IllegalArgumentException("Value '"+value+"' not defined as constant.");
 }
}
